package com.mmy.service.impl.guide;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.mmy.dao.guide.TGuideInfoRepository;
import com.mmy.domain.guide.TGuideInfo;
import com.mmy.service.guide.TGuideInfoService;

@Service
public class TGuideInfoServiceImpl implements TGuideInfoService {
	@Autowired
	TGuideInfoRepository tGuideInfoRepository;

	/* 查询所有导游信息 */
	public List<TGuideInfo> findAll() {
		// TODO Auto-generated method stub
		return tGuideInfoRepository.findAll();
	}

	/* 获取最大导游编号 */
	public Object getMaxGuideID() {
		// TODO Auto-generated method stub
		return tGuideInfoRepository.getMaxGuideID();
	}

	/* 创建导游信息 */
	public void save(int guideID) {
		// TODO Auto-generated method stub
		tGuideInfoRepository.save(guideID);
	}

	/* 创建 修改导游信息 */
	public void save(TGuideInfo tGuideInfo) {
		// TODO Auto-generated method stub
		tGuideInfoRepository.save(tGuideInfo);
	}

	/* 通过ID查询 */
	public TGuideInfo findByiGuideID(int iGuideID) {
		// TODO Auto-generated method stub
		return tGuideInfoRepository.findByiGuideID(iGuideID);
	}

	/* 删除 */
	public void deleteChecked(List<Integer> iGuideIDs) {
		// TODO Auto-generated method stub
		tGuideInfoRepository.deleteChecked(iGuideIDs);
	}

}
